<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
        <el-table v-if="isDisplay === true"
            :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
            @sort-change="onSortChange($event)"  
            :border="isDragendCol"
            :highlight-current-row ="isSingleSelect"
            :row-class-name="getRowClassName.bind(_self)"
            :cell-class-name="getCellClassName.bind(_self)"
            size="mini"
            stripe
            :height="tableHeight"
            @row-click="rowClick($event)"  
            @select-all="selectAll($event)"  
            @select="select.apply(_self, arguments)"  
            @row-class-name="onRowClassName($event)"  
            @row-dblclick="rowDBLClick($event)"  
            ref="multipleTable" :data="items" :show-header="!isHideHeader"
        >
            <template slot="empty">
                {{$t('entities.bugstats.bugresolvedgird_grid.nodata')}} 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type="selection" :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('resolvedby')">
                <el-table-column show-overflow-tooltip :prop="'resolvedby'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.resolvedby')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.resolvedby')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.resolvedby" tag="UserRealName_Gird" codelistType="DYNAMIC" renderMode="STR" valueSeparator="," textSeparator="," ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugid')">
                <el-table-column show-overflow-tooltip :prop="'bugid'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugid')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugid')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.bugid}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugtitle')">
                <el-table-column show-overflow-tooltip :prop="'bugtitle'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugtitle')" :min-width="200"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugtitle')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.bugtitle}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugpri')">
                <el-table-column show-overflow-tooltip :prop="'bugpri'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugpri')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugpri')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.bugpri" tag="Bug__pri" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugseverity')">
                <el-table-column show-overflow-tooltip :prop="'bugseverity'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugseverity')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugseverity')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.bugseverity" tag="Bug__severity" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugopenedby')">
                <el-table-column show-overflow-tooltip :prop="'bugopenedby'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugopenedby')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugopenedby')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.bugopenedby" tag="UserRealName_Gird" codelistType="DYNAMIC" renderMode="STR" valueSeparator="," textSeparator="," ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugopeneddate')">
                <el-table-column show-overflow-tooltip :prop="'bugopeneddate'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugopeneddate')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugopeneddate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data format="YYYY-MM-DD" :data="row.bugopeneddate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugresolution')">
                <el-table-column show-overflow-tooltip :prop="'bugresolution'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugresolution')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugresolution')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.bugresolution" tag="Bug__resolution" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugresolveddate')">
                <el-table-column show-overflow-tooltip :prop="'bugresolveddate'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugresolveddate')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugresolveddate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data format="YYYY-MM-DD" :data="row.bugresolveddate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('bugstatus')">
                <el-table-column show-overflow-tooltip :prop="'bugstatus'" :label="$t('entities.bugstats.bugresolvedgird_grid.columns.bugstatus')" :width="100"  :align="'left'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.bugstats.bugresolvedgird_grid.columns.bugstatus')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.bugstatus" tag="Bug__status" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
        </el-table>
        <row class="grid-pagination" v-show="items.length > 0">
            <page class="pull-right" @on-change="pageOnChange($event)" 
                @on-page-size-change="onPageSizeChange($event)"
                :total="totalRecord"
                show-sizer :current="curPage" :page-size="limit"
                :page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
                <span>
                    <span class="page-column">
                        <poptip transfer-class-name="grid-column" transfer placement="top-start">
                            <i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
                            <div slot="content">
                                <template v-for="col in allColumns">
                                    <div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
                                </template>
                            </div>
                        </poptip>
                    </span>
                    <span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
                    <span>
                        {{$t('app.gridpage.show')}}&nbsp;
                        <span>
                            <template v-if="items.length === 1">
                            1
                            </template>
                            <template v-else>
                                <span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalRecord > curPage * limit ? curPage * limit : totalRecord}}</span>
                            </template>
                        </span>&nbsp;
                        {{$t('app.gridpage.records')}}，{{$t('app.gridpage.totle')}}&nbsp;{{totalRecord}}&nbsp;{{$t('app.gridpage.records')}}
                    </span>
                </span>
            </page>
        </row>
    </i-form>
</div>